package com.aiyan.edu.api.course;

import com.aiyan.edu.framework.domain.course.*;
import com.aiyan.edu.framework.domain.course.ext.CourseView;
import com.aiyan.edu.framework.domain.course.request.CourseListRequest;
import com.aiyan.edu.framework.domain.course.response.CoursePlanNodeResult;
import com.aiyan.edu.framework.domain.course.response.CourseResponseResult;
import com.aiyan.edu.framework.model.response.CommonResponseResult;
import com.aiyan.edu.framework.model.response.QueryResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * @author: zqzhou
 * @create: 2019/10/30 10:26
 **/
@Api(value = "课程管理接口", description = "课程管理接口，提供课程的增删改查")
public interface CourseControllerApi {

    /**
     * 分页查询课程列表
     *
     * @param page
     * @param size
     * @param courseListRequest
     * @return
     */
    @ApiOperation("分页查询课程列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "页码", required = true, paramType = "path", dataType = "int"),
            @ApiImplicitParam(name = "size", value = "每页数据条数", required = true, paramType = "path", dataType = "int")
    })
    public QueryResponseResult findList(int page, int size, CourseListRequest courseListRequest);

    /**
     * 查询课程计划
     *
     * @param courseId
     * @return
     */
    @ApiOperation("查询课程计划树")
    @ApiImplicitParam(name = "courseId", value = "课程id", required = true, paramType = "path", dataType = "String")
    public CoursePlanNodeResult findPlanNode(String courseId);

    /**
     * 添加课程基本信息
     *
     * @param courseBase
     * @return
     */
    @ApiOperation("添加课程基本信息")
    public CourseResponseResult<CourseBase> addCourseBase(CourseBase courseBase);

    /**
     * 修改课程基本信息
     *
     * @param courseBase
     * @return
     */
    @ApiOperation("修改课程基本信息")
    @ApiImplicitParam(name = "courseId", value = "课程id", required = true, paramType = "path", dataType = "String")
    public CourseResponseResult<CourseBase> updateCourseBase(String courseId, CourseBase courseBase);

    /**
     * 保存课程图片数据
     *
     * @param coursePic
     * @return
     */
    @ApiOperation("保存课程图片数据")
    public CourseResponseResult<CoursePic> saveCoursePic(CoursePic coursePic);

    /**
     * 保存课程图片数据
     *
     * @param courseMarket
     * @return
     */
    @ApiOperation("保存课程营销数据")
    public CourseResponseResult<CourseMarket> saveCourseMarket(CourseMarket courseMarket);

    /**
     * 查询课程所有信息
     *
     * @param courseId
     * @return
     */
    @ApiOperation("查询课程所有信息")
    @ApiImplicitParam(name = "courseId", value = "课程id", required = true, paramType = "path", dataType = "String")
    public CourseView findCourse(String courseId);

    /**
     * 预览课程
     *
     * @param courseId
     * @return
     */
    @ApiOperation("预览课程")
    @ApiImplicitParam(name = "courseId", value = "课程id", required = true, paramType = "path", dataType = "String")
    public CourseResponseResult<String> preview(String courseId);

    /**
     * 发布课程
     *
     * @param courseId
     * @return
     */
    @ApiOperation("发布课程")
    @ApiImplicitParam(name = "courseId", value = "课程id", required = true, paramType = "path", dataType = "String")
    public CourseResponseResult<String> post(String courseId);

    /**
     * 保存课程计划
     *
     * @param coursePlan
     * @return
     */
    @ApiOperation("保存课程计划")
    public CourseResponseResult<CoursePlan> saveCoursePlan(CoursePlan coursePlan);

    /**
     * 保存课程计划媒资信息
     *
     * @param coursePlanMedia
     * @return
     */
    @ApiOperation("保存课程计划媒资信息")
    public CourseResponseResult<CoursePlanMedia> saveCoursePlanMedia(CoursePlanMedia coursePlanMedia);
}
